<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="jQuery/cutPage.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>客户列表</title>
<style>
td {
	width: 13%;
}

#container {
	min-width: 1200px;
	width: 1200px;
	background: #cccc55;
	height: 100%;
}
</style>
</head>
<body onLoad="cutPage()">
	<center>
		<div id="container">

			<h3 align="center">客户列表</h3>
			<p style="color: red; font-weight: 900">管理员：${msg }</p>

			<table border="1" width="100%"
				style="text-align: center; float: left; background: orange">
				<!-- 这个是利用table做标题 -->
				<tr>
					<td>用户Id</td>
					<td>用户名</td>
					<td>用户密码</td>
					<td>用户年龄</td>
					<td>用户性别</td>
					<td>用户邮箱</td>
					<td>==操作==</td>
				</tr>
			</table>
			<c:forEach items="${userList }" var="user">
				<form action="<c:url value='/UserServlet'/>" method="post">
					<!-- 这个是表单里嵌入table -->
					<table border="1" align="center" width="100%"
						style="text-align: center; float: left">
						<tr>
							<td><input type="text" value="${user.userId }" disabled>
								<input type="text" name="userId" value="${user.userId }"
								style="display: none"></td>
							<td><input type="text" name="userName"
								value="${user.userName }"></td>
							<td><input type="text" name="userPass"
								value="${user.userPass }"></td>
							<td><input type="text" name="age" id="age"
								value="${user.age }"></td>
							<td><input type="text" name="sex" id="sex"
								value="${user.sex }"></td>
							<td><input type="text" name="email" id="email"
								value="${user.email }"></td>
							<td style="width: 7%"><input type="submit" id="submits"
								value="编辑" /></td>
							<td style="width: 6%"><input type="submit" value="删除"
								onclick="javascript:this.form.action='<c:url value='/DelectServlet' />';" /></td>
						</tr>
					</table>
				</form>
			</c:forEach>
			<br /> <br />
			<p id="tips"></p>

			<button id="forward">上一页</button>
			<input type="text" size="3" id="pageValue" placeholder="页数">
			<input type="button" value="前往" id="go"> <input type="text"
				size=4 id="howPage" placeholder="行数"> <input type="button"
				id="change" value="修改显示行数">
			<button id="next">下一页</button>
			<P id="nowPage"></P>
			
			<a href="<c:url value='/NewsServlet?method=showAll'/>" style="color:white">》》测试商品信息列表</a>
				<a href="addNews.jsp">》》智能添加商品</a>
		</div>
	
		
				
			
</body>
</center>
</html>